<?php 
include '../inc/reuse/dbconfig.php';
$sql = "SELECT faqs.*,webmaster.*  
		FROM faqs LEFT JOIN webmaster ON faqs.modified_master_id = webmaster.webmaster_id" ;
$rsd = mysql_query($sql);
$id= "";
$description ="";
while($row = mysql_fetch_array($rsd)){
	$date = $row['modified_date_time'];
	$date = substr($date, 6,2)." ".date("M", mktime(0, 0, 0, substr($date, 4,2), 1))." ".substr($date, 0,4).", ".substr($date, 8,2).":".substr($date, 10,2);
	echo "<tr>
        	<td>".mb_substr($row['faqs_title'],0,49,"UTF-8")."</td>
            <td>".mb_substr($row['faqs_answer'],0,49,"UTF-8")."</td>
            <td align=\"center\">".$row['webmaster_firstname']." ".$row['webmaster_lastname']."</td>
            <td align=\"center\">".$date."</td>
            <td align=\"center\"><a href=\"#\" onClick=\"goToEditFaqs(".$row['faqs_id'].",'".preg_replace('/[\r\n]+/', "newLine", $row['faqs_title'])."','".preg_replace('/[\r\n]+/', "newLine", $row['faqs_answer'])."')\"\"><img src=\"images/symbol/edit.png\" /></a></td>
            <td align=\"center\"><a href=\"#\" onClick=\"deleteFaqs(".$row['faqs_id'].",'".preg_replace('/[\r\n]+/', "newLine", $row['faqs_title'])."')\" ><img src=\"images/symbol/delete.png\" /></a></td>			 
		  </tr>";		
	
}
?>